package com.lins.common.mp.result;

import com.lins.common.common.enums.ExceptionCode;
import com.lins.common.common.result.Head;
import com.lins.common.common.result.Result;

import java.rmi.server.ExportException;

/**
 * @author linsir
 * @title: ExRespResult
 * @projectName lins
 * @description: 异常返回对象
 * @date 2021/12/19 10:42
 */
public class ExRespResult<B> implements Result<Head,B> {

    private Head head;

    private B data;

    @Override
    public Head getH() {
        return this.head;
    }

    @Override
    public B getB() {
        return this.data;
    }

    public ExRespResult()
    {
        this.head = new Head(ExceptionCode.BIZ_ERROR);
        this.data = null;
    }

    public ExRespResult(ExceptionCode exceptionCode)
    {
        this.head = new Head(exceptionCode);
        this.data = null;
    }
}
